package com.cv.platform.service.message;

import com.cv.platform.controller.platform.message.vo.unreadCount.CvMessageTotalUnreadRespVO;
import com.cv.platform.controller.platform.message.vo.unreadCount.CvMessageUnreadCountRespVO;
import com.cv.platform.controller.platform.message.vo.unreadCount.CvMessageUnreadCountSaveReqVO;

import java.util.List;

/**
 * 消息未读统计业务接口
 *
 * @author Charles_XDXD
 */
public interface CvMessageUnreadCountService {

    /**
     * 读取用户未读消息总数
     *
     * @param userId 用户编号
     * @return 用户未读消息总数
     */
    CvMessageTotalUnreadRespVO getTotalCount(Long userId);

    /**
     * 保存一条未读消息
     *
     * @param reqVO 未读消息保存请求参数
     */
    void increaseUnreadCount(CvMessageUnreadCountSaveReqVO reqVO);

    /**
     * 获取未读消息列表
     */
    List<CvMessageUnreadCountRespVO> getUnreadCountList();

    /**
     * 清除会话未读消息
     *
     * @param conversationId 会话编号
     */
    void clearUnreadCount(Long conversationId);

}
